<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="layout">
<head>
    <title>home</title>
</head>
<body>
<!--<h1 layout:fragment="header">Messages : View all</h1>-->
<div layout:fragment="content">
    <div class="box-header with-border">
        <h3 class="box-title">群组管理</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" role="form">
        <div class="box-body">

            <div class="form-group col-md-4 right-button">
                <button onclick="import_group()" type="button" class="btn btn-danger right-button">导入</button>
                <button onclick="output_group()" type="button" class="btn btn-danger right-button">导出</button>
                <button onclick="search_group()" type="button" class="btn btn-danger right-button">查询</button>
                <button onclick="add_group()" type="button" class="btn btn-success right-button">新增</button>
            </div>
        </div>
    </form>
    <div class="box-body">
        <table id="group" class="table table-bordered table-striped">
            <thead>
            <tr>
                <th>序号</th>
                <th><input type="checkbox" value="groupTab_box" onclick="groupTab_box()"></th>
                <th>群组名</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div class="modal" id="groupMemModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title">群组成员</h3>
                </div>
                <div class="modal-body">
                    <table id="groupMem" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>群组名</th>
                            <th>性名</th>
                            <th>手机</th>
                            <th>邮箱</th>
                            <th>微信号</th>
                            <th>机构名</th>
                            <th>部门</th>
                            <th>职责</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div><!-- /.modal -->
    </div>
    <div class="modal" id="groupModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title">新增群组</h3>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="addGroupName">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="add_show" class="col-sm-2 control-label">群组显示值</label>

                                <div class="col-sm-10">
                                    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                                    <input type="text" class="form-control" id="add_show" data-rule="required(群组显示值必须填写)" name="group_name" placeholder="群组显示值">
                                    <input type="hidden" id="id" name="id">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-primary" onclick="group_sub()">
                        确认
                    </button>
                    <button class="btn btn-warning" data-dismiss="modal">退出</button>
                </div>
            </div>
        </div><!-- /.modal -->
    </div>
    <div id="group-modal-form" class="modal" tabindex="-1" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h4 class="blue bigger">群组导入</h4>
                </div>
                <form action="../../admin/group/import" id="groupFileForm" method="post" enctype="multipart/form-data">
                    <div class="modal-body">
                        <fieldset>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right">导入文件：</label>
                                <div class="">
                                    <input type="file" id="importGroupFile" name="groupFile"/>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                    <div class="modal-footer">
                        <button type="reset" class="btn btn-sm" data-dismiss="modal">
                            <i class="ace-icon fa fa-times"></i>
                            返回
                        </button>
                        <button type="button" onclick="submitGroupFile()" class="btn btn-sm btn-primary">
                            <i class="ace-icon fa fa-check"></i>
                            提交
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="../../static/js/pages/group.js"></script>
</div>
</body>
</html>
